/*******************************************************************************************
 *  Wait.c
 *
 *  Creating and managing Wait object structures.
 *
 *******************************************************************************************/







/*******************************************************************************************
 *  INCLUDES :
 *******************************************************************************************/

/* System and library related : */
#include <stdlib.h>
#include <string.h>

/* Project related : */
#include "Wait.h"







/*******************************************************************************************
 *  FUNCTIONS :
 *******************************************************************************************/

/*******************************************************************************************
 *  NEWWAIT : Creates an empty Wait object structure.
 *******************************************************************************************/
Wait *newWait(void) {
	Wait *w;

	/* Creating the container structure : */
	w = (Wait *)malloc(sizeof(Wait));


	/* Setting the object's type : */
	w->otype = waiting;


	/* Returning the still empty structure : */
	return w;

}




/*******************************************************************************************
 *  FREEWAIT : destroys a Wait object structure and all the objects it stores.
 *******************************************************************************************/
void freeWait(Wait *w) {

	free(w->frames);			/* Free the value string.  */
	free(w);				/* Free the object itself. */

}



/*******************************************************************************************
 *  SETWAITFRAMES : sets the Wait object's frame count.
 *******************************************************************************************/
void setWaitFrames(Wait *w, char *f) {
	w->frames = f;
}
